﻿#ifndef BIZ_H
#define BIZ_H

#include "bizeditor.h"
#include "bizadd.h"
#include "support/updater.h"

#define ETC_BIZ "/loss.ini"

namespace Ui {
class Biz;
}

class Biz : public BizEditor
{
    Q_OBJECT

public:
    explicit Biz(QWidget *parent = 0);
    ~Biz();

    void createMenu();
    void generateMenu();

    bool loadColumnWidth();
    void saveColumnWidth();
    void setHeaderData();

    void newItem();
    void en_finish();
    void en_remove();
    void edit_on();
    void edit_off();
    void finishThread();
    void endThread();

private slots:
    void on_tableView_doubleClicked(const QModelIndex &);

private:
    Ui::Biz *ui;

    bool isFinished;
    Updater *updater;
    QThread updateThread;
};

#endif // BIZ_H
